$(function(){
	$("#saveerrmsg").click(function(){ 
		addpush('请稍等...');
       $.ajax({
            url: 'action/editperson.php?type=msg&err_z=' + $("#err_z").val()+"&err_o="+$("#err_o").val()+"&err_lic_z="+$("#err_lic_z").val()+"&err_lic_o="+$("#err_lic_o").val()+"&err_lic_t="+$("#err_lic_t").val(),
            type: 'GET',
            dataType: 'html',
            timeout: 5000,
            error: function() {
               addpush('修改失败，内部错误。');
				$('#setting').click();
            },
            success: function(re) {  
                if(re=="1")
                {
                   addpush('修改失败，未知错误。');
					$('#setting').click();
                }
                else
                {
                   addpush('修改成功');
					$('#setting').click();
                }
            }
        });
    });
     $("#editnickname").click(function(){ 
     	addpush('请稍等...');
       $.ajax({
            url: 'action/editperson.php?type=name&nickname=' + $("#edit_nickname").val(),
            type: 'GET',
            dataType: 'html',
            timeout: 5000,
            error: function() {
                addpush('修改失败，内部错误。');
				$('#setting').click();
            },
            success: function(re) {  
                if(re=="1")
                {
                     addpush('修改失败，未知错误。');
					$('#setting').click();
                }
                else
                {
                    addpush('修改成功');
					$('#setting').click();
                }
            }
        });
    });
});
function addpush(data) {

	$('#push-panel').attr('style', '');
	$('#push').html(data);
	$('#push-panel').addClass('am-animation-slide-left');
	setTimeout('removepush()', 1500)
}

function removepush() {

	$('#push-panel').removeClass('am-animation-slide-left');
	$('#push-panel').attr('style', 'display:none');
}